package com.wanxi.controller;

import com.wanxi.entity.Result;
import com.wanxi.vo.LabelVo;
import com.wanxi.vo.PageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author yangjin
 * @date 2022年08月10日 8:28
 */
@RestController
@RequestMapping("/web/label")
@Api(tags = "商品标签管理")
public class LabelController {
    @GetMapping("/labelsList")
    @ApiOperation("商品标签列表")
    public Result labelList(LabelVo labelVo, PageVo pageVo){

        return new Result("",0,new LabelVo(),10,null);
    }

    @PostMapping("/addLabel")
    @ApiOperation("商品标签添加")
    public Result labelAdd(@RequestBody LabelVo labelVo){
        return new Result("add successful",200,null,1,null);
    }

    @PostMapping("/labelUpdate")
    @ApiOperation("商品标签编辑")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "labelId",value = "标签Id",required = true,paramType = "path",dataType = "Integer"),
    })
    public Result labelUpdate(@RequestParam Integer labelId,@RequestBody LabelVo labelVo){

        return new Result("update successful",200,null,1,null);
    }

    @PostMapping("/labelDelete")
    @ApiOperation("商品标签删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "labelId",value = "标签Id",required = true,paramType = "path",dataType = "Integer"),

    })
    public Result labelDelete(@RequestParam Integer labelId){

        return new Result("delete successful",200,null,1,null);
    }

    @GetMapping("/labelFindById")
    @ApiOperation("按Id查询单条标签")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "labelId",value = "标签Id",required = true,paramType = "path",dataType = "Integer"),
    })
    public Result labelFindById(@RequestParam Integer labelId){
        return new Result("",0,new LabelVo(),1,null);
    }
}
